FROM registry.baidubce.com/paddlepaddle/paddle:3.0.0b0

#设置环境变量
ENV TZ=Asia/Shanghai \
    DEBIAN_FRONTEND=noninteractive

# 设置当前目录为工作目录
WORKDIR /paddle

#安装pip依赖库
RUN pip install paddleocr==2.8.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install fastapi==0.111.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install uvicorn==0.30.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install python-multipart==0.0.9 -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install requests==2.32.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install numpy==1.25.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

#将此目录复制进去
COPY . /paddle

# CMD ["python3", "./main.py"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0","--port","10086"]